import 'package:flutter/material.dart';
import 'package:flutter_oldman_health/api/constant.dart';

class UserAgreementPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
   return Container(
        //padding: EdgeInsets.only(top: 12),
        color: Constant.backgroundColor,
        child: Column(children: <Widget>[
          _getTitle(context),
          Container(
            width: 200,
            height: 500,
          )
        ]));
  }

  Widget _getTitle(BuildContext context, [String title = "用户协议和隐私条款"]) {
    return Container(
        color: Constant.appbarColor,
        padding: EdgeInsets.fromLTRB(16, 46, 16, 16),
        child: FractionallySizedBox(
            widthFactor: 1,
            child: Stack(alignment: Alignment.center, children: [
              Positioned(
                  left: 2,
                  child: GestureDetector(
                      behavior: HitTestBehavior.translucent,
                      onTap: () {
                        Navigator.pop(context);
                        //myMapController.removeMarker(marker);
                      },
                      child: Container(
                          child: Icon(Icons.arrow_back_ios),
                          padding: EdgeInsets.fromLTRB(15, 10, 20, 10)))),
              Text(title,
                  textAlign: TextAlign.center,
                  style: TextStyle(
                      fontSize: 22,
                      color: Colors.black87,
                      fontWeight: FontWeight.normal))
            ])));
  }
}
